package com.csnf.hymall.service.impl;

import com.csnf.hymall.dao.UserMapper;
import com.csnf.hymall.dao.imp.UserMapperImp;
import com.csnf.hymall.service.UserService;

import java.text.SimpleDateFormat;
import java.util.Date;
import com.csnf.hymall.entity.User;


public class UserServiceImpl implements UserService {

    UserMapper userMapper = new UserMapperImp();

    @Override
    public int getUserTotal(String startDate, String endDate) {
        if (startDate == null || endDate == null) {
            startDate ="2010-01-01";
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
            endDate = simpleDateFormat.format(new Date());//当前时间
        }
        return userMapper.getUserTotal(startDate,endDate);
    }
}
